/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.cx1.model;

import java.io.Serializable;
import org.apache.commons.lang.StringUtils;

/**
 *
 * @author CX
 */
public class Amenity extends Base implements Serializable {
    
    private static final long serialVersionUID = 1;
    
    private String title;
    private String description;
    private String notes;

    //CX: references to objects
    
    //x
    private String amenityTypeID;
    
    //CX: referenced objects
    
    //x
    private AmenityType amenityType;
    
    public Amenity() {
    
    }

    public Amenity(String title, String description, String notes) {
        this.title = title;
        this.description = description;
        this.notes = notes;
    }

    public Amenity(String id, String title, String description, String notes) {
        this.setId(id);
        this.title = title;
        this.description = description;
        this.notes = notes;
    }   
        
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getNotes() {
        return notes;
    }

    public void setNotes(String notes) {
        this.notes = notes;
    }

    public String getAmenityTypeID() {
        return amenityTypeID;
    }

    public void setAmenityTypeID(String amenityTypeID) {
        this.amenityTypeID = amenityTypeID;
    }

    public AmenityType getAmenityType() {
        return amenityType;
    }

    public void setAmenityType(AmenityType amenityType) {
        this.amenityType = amenityType;
    }

    @Override
    public boolean equals(Object obj) {
        boolean equal = false;
        if (obj instanceof Amenity) {
            if ( StringUtils.equals( this.getId() , ((Amenity)obj).getId()) ) {
                equal = true;
            }
        }
        return equal;
    }

    @Override
    public int hashCode() {
        return 1;
    }
    
}
